import { defineStore } from 'pinia'

export const usePersonalStore = defineStore('personal', {
  state: () => ({
    mobile: '',
    userId:''
  }),
  actions: {
    setMobile(val) {
      this.mobile = val
    },
    setUserId(val){
      this.userId = val;
    }
  },
  // 开启数据缓存
  persist: {
    enabled: true,
    strategies:[{
      key: "user",
      storage: localStorage
    }]
  },
})
